﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;

namespace ElasticSearch.Controllers
{
    public class BaseApiController : ApiController
    {
        //public MongoDatabase db;
        //public MongoCollection col = null;//用于直接返回查询的json
        //public BaseApiController() { }
        //public BaseApiController(string collectionName)
        //{
        //    db = DbHelper.MongodbHelper.Instance.DB;
        //    col = db.GetCollection(collectionName);
        //}
        //public string GetStringRequest(string paramter)
        //{
        //    return HttpContext.Current.Request.QueryString[paramter] ?? "";
        //}
        //public int? GetIntRequest(string paramter)
        //{
        //    string tmp = HttpContext.Current.Request.QueryString[paramter] ?? "";
        //    int tag = 0;
        //    if (!int.TryParse(tmp, out tag))
        //    {
        //        return null;
        //    }
        //    return tag;
        //}
    }
}
